<div>
    <div class="ibox">
        <div class="ibox-title">
            <h5>订单详情</h5>
            <div class="ibox-tools" style="top:10px;">
                <button type="button" class="btn btn-primary btn-sm" v-on:click="_goBack()">
                    <i class="fa fa-times"></i> 返回
                </button>
            </div>
        </div>
        <div class="ibox-content">
            <div class="row">
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="col-form-label">订单编码：</label>
                        <label class="">{{storeOrderCartDetailInfo.orderId}}</label>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="col-form-label">总金额:</label>
                        <label class="">{{storeOrderCartDetailInfo.payPrice}}</label>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="col-form-label">下单时间:</label>
                        <label class="">{{storeOrderCartDetailInfo.createTime}}</label>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="col-form-label">用户:</label>
                        <label class="">{{storeOrderCartDetailInfo.personName}}</label>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="col-form-label">是否分账:</label>
                        <label class="">{{storeOrderCartDetailInfo.profitSharing == 'N'?'否':'是'}}</label>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="col-form-label">平台:</label>
                        <label class="">{{storeOrderCartDetailInfo.appName}}</label>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="ibox">
        <div class="ibox-title">
            <h5>商品信息</h5>
            <div class="ibox-tools" style="top:10px;">
            </div>
        </div>
        <div class="ibox-content">
            <table class="table table-stripped">
                <thead>
                    <tr>
                        <th class="text-center">商品图片</th>
                        <th class="text-center">商品名称</th>
                        <th class="text-center">商品编号</th>
                        <th class="text-center">数量</th>
                        <th class="text-center">支付金额</th>
                        <th class="text-center">状态</th>
                        <th class="text-center">支付时间</th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="(cart,index) in storeOrderCartDetailInfo.storeOrderCarts">
                        <td class="text-center">
                            <div style="position: relative; display: inline-block;">
                                <img width="50" height="50" v-bind:src="cart.coverPhoto" style="border-radius: 10px;"
                                    onerror="this.src='/img/noPhoto.jpg';">
                            </div>
                        </td>
                        <td class="text-center">{{cart.prodName}}({{cart.specValue}})</td>
                        <td class="text-center">{{cart.productId}}</td>
                        <td class="text-center">{{cart.cartNum}}</td>
                        <td class="text-center">{{cart.payPrice}}</td>
                        <td class="text-center">{{cart.stateName}}</td>
                        <td class="text-center">{{cart.createTime}}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <div class="ibox">
        <div class="ibox-title">
            <h5>费用信息</h5>
            <div class="ibox-tools" style="top:10px;">
            </div>
        </div>
        <div class="ibox-content">
            <table class="table table-stripped">
                <thead>
                    <tr>
                        <th scope="col" class="text-center">序号</th>
                        <th class="text-center">费用名称</th>
                        <th class="text-center">金额</th>
                        <th class="text-center">支付金额</th>
                        <th class="text-center">支付方式</th>
                        <th class="text-center">状态</th>
                        <th class="text-center">支付时间</th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="(storeOrderCartFee,index) in storeOrderCartDetailInfo.storeOrderCartFees">
                        <th scope="row" width="10%" class="text-center">{{index+1}}</th>
                        <td class="text-center">{{storeOrderCartFee.feeName}}</td>
                        <td class="text-center">{{storeOrderCartFee.price}}</td>
                        <td class="text-center">{{storeOrderCartFee.payPrice}}</td>
                        <td class="text-center">{{storeOrderCartFee.payWayName}}</td>
                        <td class="text-center">{{storeOrderCartFee.state == '1001'? '未支付':'已支付'}}</td>
                        <td class="text-center">{{storeOrderCartFee. updateTime}}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <div class="ibox">
        <div class="ibox-title">
            <h5>分账信息</h5>
            <div class="ibox-tools" style="top:10px;">
            </div>
        </div>
        <div class="ibox-content">
            <table class="table table-stripped">
                <thead>
                    <tr>
                        <th scope="col" class="text-center">商户</th>
                        <th scope="col" class="text-center">规格</th>
                        <th scope="col" class="text-center">分账金额</th>
                        <th scope="col" class="text-center">充值</th>
                        <th scope="col" class="text-center">对象编号</th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="(item,index) in storeOrderCartDetailInfo.ledgers">
                        <th class="text-center">{{item.storeName}}</th>
                        <td class="text-center">{{getFeeSpecName(item)}}</td>
                        <td class="text-center">{{item.amount}}</td>
                        <td class="text-center">{{getFeeSaveTypeName(item)}}</td>
                        <td class="text-center">{{item.saveObjId}}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <div class="ibox" v-if="storeOrderCartDetailInfo.storeOrderDiscounts.length > 0">
        <div class="ibox-title">
            <h5>优惠信息</h5>
            <div class="ibox-tools" style="top:10px;">
            </div>
        </div>
        <div class="ibox-content">
            <table class="table table-stripped">
                <thead>
                    <tr>
                        <th scope="col" class="text-center">序号</th>
                        <th class="text-center">优惠方式</th>
                        <th class="text-center">优惠金额</th>
                        <th class="text-center">说明</th>
                        <th class="text-center">时间</th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="(storeOrderDiscount,index) in storeOrderCartDetailInfo.storeOrderDiscounts">
                        <th scope="row" width="10%" class="text-center">{{index+1}}</th>
                        <td class="text-center">{{storeOrderDiscount.discountTypeName}}</td>
                        <td class="text-center" v-if="storeOrderDiscount.discountType=='2002'">
                            {{storeOrderDiscount.discountPrice}}
                        </td>
                        <td class="text-center" v-else>
                            {{storeOrderDiscount.discountPrice}}({{storeOrderDiscount.discountRate}})
                        </td>
                        <td class="text-center">{{storeOrderDiscount.remark}}</td>
                        <td class="text-center">{{storeOrderDiscount.createTime}}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <div class="ibox" v-if="storeOrderCartDetailInfo.appId != '992021030901240071'">
        <div class="ibox-title">
            <h5>收货人信息</h5>
            <div class="ibox-tools" style="top:10px;">
            </div>
        </div>
        <div class="ibox-content">
            <div class="row">
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="col-form-label">用户名称：</label>
                        <label class="">{{storeOrderCartDetailInfo.addressInfo.username}}</label>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="col-form-label">手机号码:</label>
                        <label class="">{{storeOrderCartDetailInfo.addressInfo.tel}}</label>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="col-form-label">收货地址:</label>
                        <label class="">{{storeOrderCartDetailInfo.addressInfo.address}}</label>
                    </div>
                </div>
                <div class="col-sm-3">
                    <div class="form-group">
                        <label class="col-form-label">备注:</label>
                        <label class="">{{storeOrderCartDetailInfo.remark}}</label>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="ibox">
        <div class="ibox-title">
            <h5>操作信息</h5>
            <div class="ibox-tools" style="top:10px;">
            </div>
        </div>
        <div class="ibox-content">
            <table class="table table-stripped">
                <thead>
                    <tr>
                        <th scope="col" class="text-center">序号</th>
                        <th scope="col" class="text-center">操作时间</th>
                        <th scope="col" class="text-center">说明</th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="(item,index) in storeOrderCartDetailInfo.events">
                        <th scope="row" width="10%" class="text-center">{{index+1}}</th>
                        <td width="30%" class="text-center">{{item.createTime}}</td>
                        <td width="60%" class="text-center">{{item.eventMsg}}</td>
                    </tr>
                </tbody>
            </table>
        </div>

    </div>


</div>